//
//  XCRankModel.m
//  SoundOfNature
//
//  Created by 梁新昌 on 16/3/10.
//  Copyright © 2016年 梁新昌. All rights reserved.
//

#import "XCRankModel.h"

@implementation XCRankModel

- (void)dealloc {
    [_name release];
    [_refs release];
    [_refsModel release];
    [_mutableArray release];
    [super dealloc];
}

- (instancetype)initWithDataSource:(NSDictionary *)dataSource
{
    self = [super initWithDataSource:dataSource];
    if (self) {
        
        self.mutableArray = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *dic in self.refs) {
            
            XCRefsModel *refsModel = [[XCRefsModel alloc] initWithDataSource:dic];
            [self.mutableArray addObject:refsModel];
        }
        self.refs = [NSArray arrayWithArray:self.mutableArray];
    }
    return self;
}


@end
